package exam.AndroidFirst;


import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class Tab4 extends Activity{
	Intent i;
	public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.tab4);

        Button schoolBtn=(Button)findViewById(R.id.schoolFoodButton);
        Button outBtn=(Button)findViewById(R.id.outFoodButton);
        schoolBtn.setOnClickListener(mClickListener);
        outBtn.setOnClickListener(mClickListener);
	}
	Button.OnClickListener mClickListener= new Button.OnClickListener(){
		public void onClick(View v){
			switch(v.getId()){
			case R.id.schoolFoodButton:
				i = new Intent(Tab4.this, Tab4SchoolFood.class);
				break;
			case R.id.outFoodButton:
				i = new Intent(Tab4.this, Tab4OutFood.class);
				break;
			}	
			startActivity(i);
		}
	};
}
